#ifndef FILM_H
#define FILM_H

typedef unsigned long fl_cell;

typedef struct fl_image {
  fl_cell here;
  fl_cell *latest;
  fl_cell size;
  fl_cell space[];
} fl_image;

typedef struct fl_stack {
  fl_cell *top;
  fl_cell *current;
  fl_cell *base;
} fl_stack;

typedef struct fl_engine {
  fl_cell id;
  fl_stack ds;
  fl_stack rs;
} fl_engine;

fl_image *fl_image_init(void *memory, int size);
fl_engine *fl_engine_new(int stack_size, int rstack_size);
int fl_start(fl_image *image, fl_engine *engine, fl_cell xt[]);
void fl_eval(fl_image *image, fl_engine *engine, const char *src);

extern int fl_argc;
extern char **fl_argv;

#endif
